home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
B-Book Series
/
(k)b4.d64
/
solution4.11
< prev
next >
Wrap
Text File
|
2007-02-28
|
322b
|
14 lines
0010 MIN:=999; MINROUTE:=0
0020 FOR ROUTE:=1 TO 15 DO
0030 JOIN:=ROUTE*10
0040 LEG1:=SQR(1600+JOIN^2)
0050 LEG2:=200-JOIN
0060 TIM:=LEG1/45+LEG2/60
0070 PRINT "TIME FOR ROUTE";ROUTE;"IS";TIM
0080 IF TIM<MIN THEN
0090 MIN:=TIM
0100 MINROUTE:=ROUTE
0110 ENDIF
0120 ENDFOR ROUTE
0130 PRINT "ROUTE IS";MINROUTE;"TIME IS";MIN